<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreatePagesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('pages', function (Blueprint $table) {
            $table->increments('id');
            $table->string('uri')->nullable()->comment('uri路徑');
            $table->string('title')->nullable()->comment('標題');
            $table->text('desc')->nullable()->comment('描述');
            $table->tinyInteger('mode')->default(0)->comment('内容模式');
            $table->longText('content')->nullable()->comment('内容');
            $table->string('html_file')->nullable()->comment('自定义布局html');
            $table->tinyInteger('status')->default('1')->comment('狀態');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('pages');
    }
}
